/**
 * @作者:黎谢之
 * @创建时间：2021/7/7
 * @修改时间：2021/7/10
 */
package com.example.senior_bug.controller;

import com.example.senior_bug.ToolClass.Result;

import com.example.senior_bug.Service.GoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/Good")
public class GoodController {
    @Autowired
    private GoodService goodService;

    //通过SPU名字获取SPU对象进而获取SPUID
    @RequestMapping("/getID")
    public Result GetByName(@RequestParam String Name) {
        return goodService.GetGoodByName(Name);
    }
}
